//base class for Streams used
//for now, FileStream, MemoryStream and DriveStream
#pragma once
#include "MemoryBuffer.h"

namespace System
{
	namespace IO
	{
		enum SeekOrigin
		{
			Begin,
			End,
			Current,
		};

		class SYSTEM_API Stream //: public System::Object
		{
		public:			
			virtual int  read(System::MemoryBuffer& memBuf, int offset, size_t count) = 0;
			virtual int  readByte(byte& value) = 0;
			virtual ud_uint64 seek(ud_uint64 offset, System::IO::SeekOrigin origin) = 0;
			virtual void setLength(ud_uint64 value) = 0;
			virtual int write(const System::MemoryBuffer& memBuf, int offset, size_t count) = 0;
			virtual void writeByte(byte value) = 0;
		};
	}
}
